package cn.glutnn.controller;


import cn.glutnn.entity.FoodType;
import cn.glutnn.entity.Result;
import cn.glutnn.service.FoodTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;

/**
 * 食品类型表(FoodType)表控制层
 *
 * @author msh
 * @since 2024-12-10 22:35:18
 */
@RestController
@RequestMapping("/foodType")
public class FoodTypeController {
    /**
     * 服务对象
     */
    @Autowired
    private FoodTypeService foodTypeService;

    @GetMapping("/list")
    public Result<List<FoodType>> list() {
        return Result.success(foodTypeService.list());
    }
}

